* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #f4f7f9;
  color: #333;
}

.container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 20px;
}

header {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.back-link {
  position: absolute;
  top: 10px;
  left: 10px;
  text-decoration: none;
  color: #667eea;
  font-weight: 600;
  transition: color 0.3s;
}

.back-link:hover {
  color: #764ba2;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: #3d4e68;
}

header p {
  font-size: 1.1rem;
  color: #667282;
}

main {
  background: white;
  border-radius: 15px;
  padding: 40px 60px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
  min-width: 1000px;
}

.diff-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  margin-bottom: 30px;
}

.input-panel h3 {
  margin-bottom: 15px;
  font-size: 1.2rem;
  color: #333;
}

textarea {
  width: 100%;
  height: 450px;
  padding: 15px;
  border: 2px solid #e0e6ed;
  border-radius: 10px;
  font-family: "Courier New", Courier, monospace;
  font-size: 1rem;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.3s, box-shadow 0.3s;
}

textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.actions {
  text-align: center;
  margin-bottom: 40px;
}

#compareBtn {
  background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
  color: white;
  border: none;
  padding: 15px 40px;
  border-radius: 30px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

#compareBtn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(86, 171, 47, 0.2);
}

.result-container {
  border-top: 2px solid #e0e6ed;
  padding-top: 30px;
}

.result-container h3 {
  margin-bottom: 20px;
  font-size: 1.2rem;
}

#diffOutput {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 20px;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: "Courier New", Courier, monospace;
  font-size: 1rem;
  line-height: 1.6;
  border: 1px solid #e0e6ed;
}

#diffOutput del {
  background-color: #f8d7da;
  color: #721c24;
  text-decoration: none;
  display: block;
  padding: 4px 8px;
  border-radius: 4px;
  margin: 2px 0;
  border-left: 4px solid #dc3545;
}

#diffOutput ins {
  background-color: #d4edda;
  color: #155724;
  text-decoration: none;
  display: block;
  padding: 4px 8px;
  border-radius: 4px;
  margin: 2px 0;
  border-left: 4px solid #28a745;
}

@media (max-width: 992px) {
  .diff-container {
    grid-template-columns: 1fr;
  }
}
